<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<%@ taglib tagdir="/WEB-INF/tags" prefix="matrix"%>
<%@ taglib uri="http://matrixcsm.zkingsoft.com" prefix="cms"%>
<c:set var="companyId" value="18" ></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="IE=edge" >
        <link rel="stylesheet" href="${path }/websites/demopc/css/bootstrap-3.3.5/css/bootstrap.css" type="text/css" >
        <link rel="stylesheet" href="${path }/websites/demopc/css/base.css" media="screen" type="text/css" >
        <link rel="stylesheet" href="${path }/websites/demopc/css/public.css" media="screen" type="text/css" >
       <link href="${path }/resource/css/styleOne/animate.min.css" rel="stylesheet" type="text/css" />
       <script type="text/javascript" src="${path }/resource/js/plugin/jquery-2.1.4.min.js"></script>
        <script type="text/javascript" src="${path }/websites/demopc/js/pageSwitch.min.js"></script>
        <script type="text/javascript" src="${path }/websites/demopc/js/respond.js"></script>
       	<script type="text/javascript"
			src="${path }/resource/js/systools/MBase.js"></script>
			<cms:setting companyId="${companyId }" var="title" code="title"></cms:setting>
			<title data-index="0" id="selextTitle">${title.paramValue }</title>
    </head>
<body>

 <jsp:include page="_top.jsp"></jsp:include>
          <div class="banner">
           <img src="${path }/websites/demopc/images/contactbanner.jpg"  alt="" />
          </div>
             <div class="contact container text-center  wow animated fadeInUp fadeIn">
 		<cms:ad companyId="${companyId }" var="lxdh" code="lxdh" multi="false"></cms:ad>
              <span class="con-title"><b>${lxdh.colName }</b></span>
              <p class="con-p">${lxdh.adTitle }</p>
              <i>${lxdh.adInfo1}</i>
              <div class="row list-bg">
              <cms:ad companyId="${companyId }" var="qq" code="xlqq" ></cms:ad>
                <ul>
                 <c:forEach var="item" items="${qq}">
                  <li class="col-md-4">
                    <img src="${path }/websites/demopc/images/contact-bg.jpg" alt="" />
                    <div class="bg-content">
                        <div class="icon">
                            <img src="${item.adImg}" alt="" style="margin-top:20px"/>
                        </div>
                        <div class="txt">
                            <p class="txt-p">${item.adTitle }</p>
                            <p class="p-sm">
                                <span>${item.adInfo1 }</span>
                                <span>${item.adInfo2 }</span>
                            </p>
                        </div>
                    </div>
                  </li>
                   </c:forEach>
                </ul>
              </div>
           
              <div class="code">
              <cms:ad companyId="${companyId }" var="sjsm" code="sjsm" multi="false"></cms:ad>
                <img src="${sjsm.adImg}" alt="" />
                <p>${sjsm.adTitle }</p>
                <img src="${path }/websites/demopc/images/erweima.png" alt="" class="code-bg"/>
              </div>
          </div>
          <form class="form-horizontal" id="dataform" onsubmit="javascript:return false;">
          <div class="contact-second-form">
            <div class="container form-sub wow animated fadeInUp fadeIn">
              <div class="form-title">
                 <span>发表您的留言:</span>
              </div>
               <input type="hidden" class="main-input" name="companyId" id="companyId" value="${companyId }"/>
              <div class="form-main">
                 <div class="main-txt">
                   <span>姓名：</span>
                   <input type="text" class="main-input" name="msgUserName" id="msgUserName" dataType="*"/>
                   <span class="red">*</span>
                 </div>
                 <div class="main-txt">
                    <span>电话：</span>
                 <input type="text" class="main-input" name="msgTel" id="msgTel"  dataType="m" />
                 </div>
                 
                 <div class="main-txt">
                   <span>地址:</span>
                   <input type="text" class="main-input" name="msgAddress" id="msgAddress" dataType="*" />
                 </div> 
              </div>
             
             <div  class="txt-area">
               <div class="text">内容：</div>
               <div class="area-content">
               <textarea  class="area-css" rows="3" cols="50" placeholder="留言需审核后才会显示" 
               name="msgContent" maxlength="10000" id="msgContent" dataType="*"></textarea>
               </div>
               </div>
                
               <div class="btn-red" style="margin-top:30px;margin-left:20%">
             <button type="button" class="btn" onclick="formSubmit();" ><a href="javascript:">提交留言</a></button>
            </div>
            </div>
            </div> 
            </form>
           
        <jsp:include page="_foot.jsp"></jsp:include>
     <script src="${path }/websites/demopc/js/wow.min.js"></script> 
     
	<script type="text/javascript" src="${path }/resource/js/systools/MJsBase.js"></script>
        <script type="text/javascript">
        MForm.initForm({ });
        if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){
        new WOW().init();
        };
       
        function formSubmit(){
        	//var data=$("#dataform").serialize();
        	var data={"companyId": $("#companyId").val(),"msgUserName": $("#msgUserName").val(),"msgTel": $("#msgTel").val(),
        			"msgAddress": $("#msgAddress").val(),"msgContent": $("#msgContent").val()};
    		$.AjaxProxy({
    			c : false,
    			p : data
    		}).invoke("${path}/spring/web/addMsg", 
    				function(loj) {
    			console.log(loj.getValue("info"));
    			 layer.msg(loj.getValue("info"), {
						icon : 1,time:1000
					});
    		});
         }
         
    </script> 
</body>

</html>